package edu.hqu.rent_system.mapper;

import edu.hqu.rent_system.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface LandLordMapper {
    int registerLandLord(LandLord landLord);//房主注册
    int deleteLandLord(int lId);//房东注销
    LandLord loginLandLord(int lId);//房东登录
    //查询所有租客
    List<LandLord> queryAllTLandlord();

    //根据手机号查询租客
    LandLord queryLandlordByPhone(String phone);


    int addHouse(House house);//房主添加房屋
    List<House> selectHouse(int lId);
    House selectHouseByhId(int hId);
    int updateHouse(House house);//房主对房屋信息进行修改
    int deleteHouse(int hId);
    LandLord getLandLordInfo(int lId);
    int updateLandLordInfo(LandLord landLord);

    List<Meeting> selectMeeting(int lId);
    List<Meeting> selectConfirmedMeeting(int lId);
    List<Meeting> selectRejectedMeeting(int lId);
    int confirmMeeting(int mId);
    int rejectMeeting(int mId);

    List<Record> selectRecord(int lId);

    List<Pay> selectPay(int lId);
    int insertPay(Pay pay);
    List<Tenant> selectTenantOfMine(int lId);
    int insertRecord(Record record);

}
